<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>投诉列表</title>
    <link rel="stylesheet" href="../css/base.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/public.js"></script>
</head>
<style>
    .fx{
        overflow: hidden;
        height: 80px;
        width: 100%;
        position: relative;
    }
    .fx-fl{
        float: left;
        width: 30%;
    }
    .fx-mid{
      float: left;
        width: 70%;

    }
    .fixin{
        position: absolute;
        top:10px;
    }
    .fixin-b{
        position: absolute;
        bottom: 10px;
    }
    .dis{
        display: block;
        border-bottom: solid 1px #dcdcdc;
        /* padding: .1rem; */
        margin: .1rem;
        padding: .1rem 0;
        box-sizing: border-box;
    }
</style>
<body>
  <!--  <div class="fx">
        <div class="fx-fl">
            <img src="../img/iconcoupon2.png" alt="" style="width: 60px;height: 60px;margin: 10px;">
        </div>
        <div class="fx-mid">
            <p class="fixin">内容内容</p>
            <p class="fixin-b"><span>投诉原因</span></p>
        </div>
        <img src="../img/下一步@2x.png" style="width:.18rem;right: .2rem;bottom: 30px;position: absolute; " alt="">
    </div>-->

    <script>
        function fmtDate(obj){
            var date =  new Date(obj);
            var y = 1900+date.getYear();
            var m = "0"+(date.getMonth()+1);
            var d = "0"+date.getDate();
            return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);
        }
        $(function (){
            $.ajax({
                url:base_url+"ZITAOHUI/complaintDetial",
                type:"post",
                data:{
                    complaintId:null,
                    storeId:sessionStorage.getItem('s_id')
                },
                dataType:"json",
                success:function (data){
                    var _d = data.extend;
                    $.each(_d.data,function (k,v){
                        $("body").append('<a class="dis" href='+"Complaints-recording.html?id="+v.id+"&pid="+v.produce_id+'><div style="color: #333;">'+"原因:"+v.reason+'</div><div style="text-align: right;font-size: 12px;color: #999;padding-right: 10px;box-sizing: border-box;">'+fmtDate(v.add_date)+'</div></a>')
                    })
                }
            })
        })
    </script>

</body>
</html>